/*
*
* Copyright (C) 2004 - 2008 BitLaboratory (see http://www.bitlaboratory.com)
* All rights reserved. 
*
* Redistribution and use in source and binary forms, with or without modification, 
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*    this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
*    this list of conditions and the following disclaimer in the documentation
*    and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
*    derived from this software without specific prior written permission. 
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
* OF SUCH DAMAGE.
*
* You can find the latest version of this library at http://www.bitlaboratory.com
*
*/


using System;
using System.Runtime.InteropServices;
using BitLaboratory.Win32Api.Windows;

namespace BitLaboratory.Win32Api.CommonControls
{
	/// <summary>
	/// 
	/// </summary>
	[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
	public struct ToolTipMessages
	{

		public static int TTM_ADDTOOL;
		public static int TTM_DELTOOL;
		public static int TTM_NEWTOOLRECT;
		public static int TTM_GETTOOLINFO;
		public static int TTM_SETTOOLINFO;
		public static int TTM_HITTEST;
		public static int TTM_GETTEXT;
		public static int TTM_UPDATETIPTEXT;
		public static int TTM_ENUMTOOLS;
		public static int TTM_GETCURRENTTOOL;

/*
#ifdef UNICODE
#define TTM_ADDTOOL             TTM_ADDTOOLW
#define TTM_DELTOOL             TTM_DELTOOLW
#define TTM_NEWTOOLRECT         TTM_NEWTOOLRECTW
#define TTM_GETTOOLINFO         TTM_GETTOOLINFOW
#define TTM_SETTOOLINFO         TTM_SETTOOLINFOW
#define TTM_HITTEST             TTM_HITTESTW
#define TTM_GETTEXT             TTM_GETTEXTW
#define TTM_UPDATETIPTEXT       TTM_UPDATETIPTEXTW
#define TTM_ENUMTOOLS           TTM_ENUMTOOLSW
#define TTM_GETCURRENTTOOL      TTM_GETCURRENTTOOLW
#if (_WIN32_IE >= 0x0500)
#define TTM_SETTITLE            TTM_SETTITLEW
#endif
#else
#define TTM_ADDTOOL             TTM_ADDTOOLA
#define TTM_DELTOOL             TTM_DELTOOLA
#define TTM_NEWTOOLRECT         TTM_NEWTOOLRECTA
#define TTM_GETTOOLINFO         TTM_GETTOOLINFOA
#define TTM_SETTOOLINFO         TTM_SETTOOLINFOA
#define TTM_HITTEST             TTM_HITTESTA
#define TTM_GETTEXT             TTM_GETTEXTA
#define TTM_UPDATETIPTEXT       TTM_UPDATETIPTEXTA
#define TTM_ENUMTOOLS           TTM_ENUMTOOLSA
#define TTM_GETCURRENTTOOL      TTM_GETCURRENTTOOLA
#if (_WIN32_IE >= 0x0500)
#define TTM_SETTITLE            TTM_SETTITLEA
#endif
#endif

#if (_WIN32_WINNT >= 0x501)
#define TTM_SETWINDOWTHEME      CCM_SETWINDOWTHEME
#endif
*/		
		public const int TTM_ACTIVATE            = ((int)WindowMessages.WM_USER + 1);
		public const int TTM_SETDELAYTIME        = ((int)WindowMessages.WM_USER + 3);
		public const int TTM_ADDTOOLA            = ((int)WindowMessages.WM_USER + 4);
		public const int TTM_ADDTOOLW			 = ((int)WindowMessages.WM_USER + 50);
		public const int TTM_DELTOOLA            = ((int)WindowMessages.WM_USER + 5);
		public const int TTM_DELTOOLW            = ((int)WindowMessages.WM_USER + 51);
		public const int TTM_NEWTOOLRECTA        = ((int)WindowMessages.WM_USER + 6);
		public const int TTM_NEWTOOLRECTW        = ((int)WindowMessages.WM_USER + 52);
		public const int TTM_RELAYEVENT          = ((int)WindowMessages.WM_USER + 7);

		public const int TTM_GETTOOLINFOA        = ((int)WindowMessages.WM_USER + 8);
		public const int TTM_GETTOOLINFOW        = ((int)WindowMessages.WM_USER + 53);

		public const int TTM_SETTOOLINFOA        = ((int)WindowMessages.WM_USER + 9);
		public const int TTM_SETTOOLINFOW        = ((int)WindowMessages.WM_USER + 54);

		public const int TTM_HITTESTA            = ((int)WindowMessages.WM_USER +10);
		public const int TTM_HITTESTW            = ((int)WindowMessages.WM_USER +55);
		public const int TTM_GETTEXTA            = ((int)WindowMessages.WM_USER +11);
		public const int TTM_GETTEXTW            = ((int)WindowMessages.WM_USER +56);
		public const int TTM_UPDATETIPTEXTA      = ((int)WindowMessages.WM_USER +12);
		public const int TTM_UPDATETIPTEXTW      = ((int)WindowMessages.WM_USER +57);
		public const int TTM_GETTOOLCOUNT        = ((int)WindowMessages.WM_USER +13);
		public const int TTM_ENUMTOOLSA          = ((int)WindowMessages.WM_USER +14);
		public const int TTM_ENUMTOOLSW          = ((int)WindowMessages.WM_USER +58);
		public const int TTM_GETCURRENTTOOLA     = ((int)WindowMessages.WM_USER + 15);
		public const int TTM_GETCURRENTTOOLW     = ((int)WindowMessages.WM_USER + 59);

		public const int TTM_WINDOWFROMPOINT     = ((int)WindowMessages.WM_USER + 16);
		public const int TTM_TRACKACTIVATE       = ((int)WindowMessages.WM_USER + 17); // wParam = TRUE/FALSE start end  lparam = LPTOOLINFO
		public const int TTM_TRACKPOSITION       = ((int)WindowMessages.WM_USER + 18); // lParam = dwPos
		public const int TTM_SETTIPBKCOLOR       = ((int)WindowMessages.WM_USER + 19);
		public const int TTM_SETTIPTEXTCOLOR     = ((int)WindowMessages.WM_USER + 20);
		public const int TTM_GETDELAYTIME        = ((int)WindowMessages.WM_USER + 21);
		public const int TTM_GETTIPBKCOLOR       = ((int)WindowMessages.WM_USER + 22);
		public const int TTM_GETTIPTEXTCOLOR     = ((int)WindowMessages.WM_USER + 23);
		public const int TTM_SETMAXTIPWIDTH      = ((int)WindowMessages.WM_USER + 24);
		public const int TTM_GETMAXTIPWIDTH      = ((int)WindowMessages.WM_USER + 25);
		public const int TTM_SETMARGIN           = ((int)WindowMessages.WM_USER + 26); // lParam = lprc
		public const int TTM_GETMARGIN           = ((int)WindowMessages.WM_USER + 27); // lParam = lprc
		public const int TTM_POP                 = ((int)WindowMessages.WM_USER + 28);

		public const int TTM_UPDATE              = ((int)WindowMessages.WM_USER + 29);

		public const int TTM_GETBUBBLESIZE       = ((int)WindowMessages.WM_USER + 30);
		public const int TTM_ADJUSTRECT          = ((int)WindowMessages.WM_USER + 31);
		public const int TTM_SETTITLEA           = ((int)WindowMessages.WM_USER + 32); // wParam = TTI_*, lParam = char* szTitle
		public const int TTM_SETTITLEW           = ((int)WindowMessages.WM_USER + 33); // wParam = TTI_*, lParam = wchar* szTitle

		public const int TTM_POPUP               = ((int)WindowMessages.WM_USER + 34);
		public const int TTM_GETTITLE            = ((int)WindowMessages.WM_USER + 35); // wParam = 0, lParam = TTGETTITLE*


		static ToolTipMessages()
		{
			if (Marshal.SystemDefaultCharSize == 1) 
			{
				TTM_ADDTOOL           =  TTM_ADDTOOLA;
				TTM_DELTOOL           =  TTM_DELTOOLA;
				TTM_NEWTOOLRECT       =  TTM_NEWTOOLRECTA;
				TTM_GETTOOLINFO       =  TTM_GETTOOLINFOA;
				TTM_SETTOOLINFO       =  TTM_SETTOOLINFOA;
				TTM_HITTEST           =  TTM_HITTESTA;
				TTM_GETTEXT           =  TTM_GETTEXTA;
				TTM_UPDATETIPTEXT     =  TTM_UPDATETIPTEXTA;
				TTM_ENUMTOOLS         =  TTM_ENUMTOOLSA;
				TTM_GETCURRENTTOOL    =  TTM_GETCURRENTTOOLA;
				return;
			}
			TTM_ADDTOOL           =  TTM_ADDTOOLW;
			TTM_DELTOOL           =  TTM_DELTOOLW;
			TTM_NEWTOOLRECT       =  TTM_NEWTOOLRECTW;
			TTM_GETTOOLINFO       =  TTM_GETTOOLINFOW;
			TTM_SETTOOLINFO       =  TTM_SETTOOLINFOW;
			TTM_HITTEST           =  TTM_HITTESTW;
			TTM_GETTEXT           =  TTM_GETTEXTW;
			TTM_UPDATETIPTEXT     =  TTM_UPDATETIPTEXTW;
			TTM_ENUMTOOLS         =  TTM_ENUMTOOLSW;
			TTM_GETCURRENTTOOL    =  TTM_GETCURRENTTOOLW;
		}
	}
}
